<?php
/*
 * 
 * Require the framework class before doing anything else, so we can use the defined urls and dirs
 * Also if running on windows you may have url problems, which can be fixed by defining the framework url first
 *
 */
//define('NHP_OPTIONS_URL', site_url('path the options folder'));
if(!class_exists('NHP_Options')){
	require_once( dirname( __FILE__ ) . '/options/options.php' );
}

/*
 * 
 * Custom function for filtering the sections array given by theme, good for child themes to override or add to the sections.
 * Simply include this function in the child themes functions.php file.
 *
 * NOTE: the defined constansts for urls, and dir will NOT be available at this point in a child theme, so you must use
 * get_template_directory_uri() if you want to use any of the built in icons
 *
 */
function add_another_section($sections){
	
	//$sections = array();
	$sections[] = array(
				'title' => __('A Section added by hook', THEMENAME),
				'desc' => __('<p class="description">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', THEMENAME),
				//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.
				//You dont have to though, leave it blank for default.
				'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',
				//Lets leave this as a blank section, no options just some intro text set above.
				'fields' => array()
				);
	
	return $sections;
	
}//function
//add_filter('nhp-opts-sections-twenty_eleven', 'add_another_section');


/*
 * 
 * Custom function for filtering the args array given by theme, good for child themes to override or add to the args array.
 *
 */
function change_framework_args($args){
	
	//$args['dev_mode'] = false;
	
	return $args;
	
}
//function
//add_filter('nhp-opts-args-twenty_eleven', 'change_framework_args');









/*
 * This is the meat of creating the optons page
 *
 * Override some of the default values, uncomment the args and change the values
 * - no $args are required, but there there to be over ridden if needed.
 *
 *
 */

function setup_framework_options()
{

$args = array();

//Set it to dev mode to view the class settings/info in the form - default is false
$args['dev_mode'] = false;

//google api key MUST BE DEFINED IF YOU WANT TO USE GOOGLE WEBFONTS
//$args['google_api_key'] = '***';

//Remove the default stylesheet? make sure you enqueue another one all the page will look whack!
//$args['stylesheet_override'] = true;

//Setup custom links in the footer for share icons
$args['share_icons']['facebook'] = array(
										'link' => 'https://www.facebook.com/webseo24h',
										'title' => 'Folow us on Facebook', 
										'img' => get_template_directory_uri().'/images/common/ico-facebook.png'
										);
$args['share_icons']['twitter'] = array(
										'link' => 'https://twitter.com/dbthanhbinh',
										'title' => 'Folow us on Twitter', 
										'img' => get_template_directory_uri().'/images/common/ico-twitter.png'
										);                                       
$args['share_icons']['linked_in'] = array(
										'link' => 'https://plus.google.com/u/0/b/106001525873448285383/106001525873448285383/posts',
										'title' => 'Find us on Google+', 
										'img' => get_template_directory_uri().'/images/common/ico-google.png'
										);    
              

//Choose to disable the import/export feature
//$args['show_import_export'] = false;
//Choose a custom option name for your theme options, the default is the theme name in lowercase with spaces replaced by underscores
$args['opt_name'] = 'basic';

//Custom menu icon
//$args['menu_icon'] = '';

//Custom menu title for options page - default is "Options"
$args['menu_title'] = __('Theme Options', THEMENAME);

//Custom Page Title for options page - default is "Options"
$args['page_title'] = __('Basic Theme Options', THEMENAME);

//Custom page slug for options page (wp-admin/themes.php?page=***) - default is "nhp_theme_options"
$args['page_slug'] = 'nhp_theme_options';

//Custom page capability - default is set to "manage_options"
//$args['page_cap'] = 'manage_options';

//page type - "menu" (adds a top menu section) or "submenu" (adds a submenu) - default is set to "menu"
//$args['page_type'] = 'submenu';

//parent menu - default is set to "themes.php" (Appearance)
//the list of available parent menus is available here: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters
//$args['page_parent'] = 'themes.php';

//custom page location - default 100 - must be unique or will override other items
$args['page_position'] = 90;

//Custom page icon class (used to override the page icon next to heading)
//$args['page_icon'] = 'icon-themes';

//Want to disable the sections showing as a submenu in the admin? uncomment this line
//$args['allow_sub_menu'] = false;
		
//Set ANY custom page help tabs - displayed using the new help tab API, show in order of definition		
$args['help_tabs'][] = array(
							'id' => 'nhp-opts-1',
							'title' => __('Theme Information 1', THEMENAME),
							'content' => __('<p>This is the tab content, HTML is allowed.</p>', THEMENAME)
							);
$args['help_tabs'][] = array(
							'id' => 'nhp-opts-2',
							'title' => __('Theme Information 2', THEMENAME),
							'content' => __('<p>This is the tab content, HTML is allowed.</p>', THEMENAME)
							);

//Set the Help Sidebar for the options page - no sidebar by default										
$args['help_sidebar'] = __('<p>This is the sidebar content, HTML is allowed.</p>', THEMENAME);

// Pull all pages into an array
    $options_pages = array();
    $options_pages_obj = get_pages();
    foreach ($options_pages_obj as $page) {
        $options_pages[$page->ID] = $page->post_title;
    }
// Pull all the categories into an array
    $options_categories = array();
    $options_categories_obj = get_categories();
    foreach ($options_categories_obj as $category) {
        $options_categories[$category->cat_ID] = $category->cat_name;
    }    
  


$sections = array();

    $sections[] = array(
        'icon' => NHP_OPTIONS_URL . 'img/glyphicons/glyphicons_137_computer_service.png',
        'title' => __('Genaral setting', THEMENAME),
        'desc' => __('<p class="description"></p>', THEMENAME),
        'fields' => array(
            array(
                'id' => 'basic_logo', //must be unique
                'type' => 'upload', //builtin fields include:
                //text|textarea|editor|checkbox|multi_checkbox|radio|radio_img|button_set|select|multi_select|color|date|divide|info|upload
                'title' => __('Custom Logo', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('Choose your own logo.', THEMENAME),
            ),
            array(
                'id' => 'basic_favicon',
                'type' => 'upload',
                'title' => __('Custom Favicon', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __("Choose a 16px x 16px image that will represent your website's favicon.", THEMENAME),
                'msg' => '',
                'std' => ''
            ),
        		array(
        				'id' => 'basic_facebook_api',
        				'type' => 'text',
        				'title' => __('Facebook API key', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				//'desc' => __('Enter your facebook profile URL', THEMENAME),
        				'std' => ''// 1 = on | 0 = off
        		),
            array(
                'id' => 'basic_facebooklink',
                'type' => 'text',
                'title' => __('Facebook page URL', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                //'desc' => __('Enter your facebook profile URL', THEMENAME),
                'std' => ''// 1 = on | 0 = off
            ),        	
            array(
                'id' => 'basic_googlelink',
                'type' => 'text',
                'title' => __('Google+ profile URL', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                //'desc' => __('Enter your Google plus profile link', THEMENAME),
                'std' => ''// 1 = on | 0 = off
            ),
        		array(
        				'id' => 'basic_youtobelink',
        				'type' => 'text',
        				'title' => __('Youtobe URL', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				//'desc' => __('Enter your Google plus profile link', THEMENAME),
        				'std' => ''// 1 = on | 0 = off
        		),
            array(
                'id' => 'basic_twitterlink',
                'type' => 'text',
                'title' => __('Twitter profile URL', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                //'desc' => __('Enter your twitter profile link', THEMENAME),
                'std' => ''// 1 = on | 0 = off
            ),          
           
            array(
						'id' => 'post_comment_display',
						'type' => 'radio',
						'title' => __('Comment all single', THEMENAME), 
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
						'options' => array('display' => 'show all','hidden' => 'off all'),
						'std' => 'display'
				),
        		array(
        				'id' => 'page_comment_display',
        				'type' => 'radio',
        				'title' => __('Comment all pages', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME),
        				'options' => array('display' => 'Show all','hidden' => 'Off all'),
        				'std' => 'display'
        		),
        		array(
        				'id' => 'facebook_comment_display',
        				'type' => 'radio',
        				'title' => __('Facebook comment page/post', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME),
        				'options' => array('display' => 'Show all','hidden' => 'Off all','for_post' => 'For posts','for_page' => 'For pages'),
        				'std' => 'hidden'
        		), 
        		array(
        				'id' => 'facebook_comment_datawidth',
        				'type' => 'text',
        				'title' => __('Facebook comment data width', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('Facebook comment data width Ex:500', THEMENAME),        				
        				'std' => '500'
        		),
        		array(
        				'id' => 'facebook_comment_showpost',
        				'type' => 'text',
        				'title' => __('Facebook comment show posts', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('Facebook comment show posts Ex:10', THEMENAME),
        				'std' => '10'
        		),
        		array(
        				'id' => 'facebook_comment_color',
        				'type' => 'radio',
        				'title' => __('Facebook comment Color Scheme', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('Facebook comment Color Scheme', THEMENAME),
        				'options' => array('dark' => 'Dark','light' => 'Light'),
        				'std' => 'dark'
        		),
        		
        		array(
        				'id' => 'page_social_display',
        				'type' => 'radio',
        				'title' => __('Show social on all pages', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME),
        				'options' => array('display' => 'Show','hidden' => 'Off'),
        				'std' => 'display'
        		),
        		array(
        				'id' => 'post_social_display',
        				'type' => 'radio',
        				'title' => __('Show social on all post', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME),
        				'options' => array('display' => 'Show','hidden' => 'Off'),
        				'std' => 'display'
        		),
        		array(
        				'id' => 'post_download_links',
        				'type' => 'radio',
        				'title' => __('Show post download link on single', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('Show post download link on single', THEMENAME),
        				'options' => array('display' => 'Show','hidden' => 'Off'),
        				'std' => 'hidden'
        		)
        )
    );

	/*
    $sections[] = array(
        'icon' => NHP_OPTIONS_URL . 'img/glyphicons/glyphicons_020_home.png',
        'title' => __('Home Page Settings', THEMENAME),
        //'desc' => __('<p class="description">These options for home page settings</p>', THEMENAME),
        'fields' => array(
           array(
                'id' => 'homepage_title',
                'type' => 'text',
                'title' => __('Enter Home Page Title', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
           ),
           array(
                'id' => 'homepage_posts_title',
                'type' => 'text',
                'title' => __('Enter Home Page Posts Title', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
           ),
           array(
                'id' => 'homepage_first_ico',
                'type' => 'select',
                'title' => __('Select Ico for 1st Box', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'options' =>array(
                                  '1' => 'Thumb up',
                                  '2' => 'Thumb down',
                                  '3' => 'Exclamation mark',
                                  '4' => 'Question mark',
                                  '5' => '@',
                                  '6' => 'Bubble',
                                  '7' => 'Phone',
                                  '8' => 'Earth',
                                  '9' => 'Heart',
                                  '10' => 'Search',
                                  '11' => 'Wheels',
                                  '12' => 'Pen',
                                  '13' => 'Graph',
                                  '14' => 'Flat screen'
                                  )        
           ), 
           array(
                'id' => 'homebox_first_title',
                'type' => 'text',
                'title' => __('Enter 1st Box Title', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homebox_first_text',
                'type' => 'text',
                'title' => __('Enter 1st Box Text', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homepage_second_ico',
                'type' => 'select',
                'title' => __('Select Ico for 2nd Box', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'options' =>array(
                               '1' => 'Thumb up',
                                  '2' => 'Thumb down',
                                  '3' => 'Exclamation mark',
                                  '4' => 'Question mark',
                                  '5' => '@',
                                  '6' => 'Bubble',
                                  '7' => 'Phone',
                                  '8' => 'Earth',
                                  '9' => 'Heart',
                                  '10' => 'Search',
                                  '11' => 'Wheels',
                                  '12' => 'Pen',
                                  '13' => 'Graph',
                                  '14' => 'Flat screen'
                                  )        
           ), 
           array(
                'id' => 'homebox_second_title',
                'type' => 'text',
                'title' => __('Enter 2nd Box Title', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homebox_second_text',
                'type' => 'text',
                'title' => __('Enter 2nd Box Text', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homepage_third_ico',
                'type' => 'select',
                'title' => __('Select Ico for 3rd Box', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'options' =>array(
                                  '1' => 'Thumb up',
                                  '2' => 'Thumb down',
                                  '3' => 'Exclamation mark',
                                  '4' => 'Question mark',
                                  '5' => '@',
                                  '6' => 'Bubble',
                                  '7' => 'Phone',
                                  '8' => 'Earth',
                                  '9' => 'Heart',
                                  '10' => 'Search',
                                  '11' => 'Wheels',
                                  '12' => 'Pen',
                                  '13' => 'Graph',
                                  '14' => 'Flat screen'
                                  )        
           ), 
           array(
                'id' => 'homebox_third_title',
                'type' => 'text',
                'title' => __('Enter 3rd Box Title', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homebox_third_text',
                'type' => 'text',
                'title' => __('Enter 3rd Box Text', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homepage_fourth_ico',
                'type' => 'select',
                'title' => __('Select Ico for 4th Box', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'options' =>array(
                                  '1' => 'Thumb up',
                                  '2' => 'Thumb down',
                                  '3' => 'Exclamation mark',
                                  '4' => 'Question mark',
                                  '5' => '@',
                                  '6' => 'Bubble',
                                  '7' => 'Phone',
                                  '8' => 'Earth',
                                  '9' => 'Heart',
                                  '10' => 'Search',
                                  '11' => 'Wheels',
                                  '12' => 'Pen',
                                  '13' => 'Graph',
                                  '14' => 'Flat screen'
                                  )        
           ), 
           array(
                'id' => 'homebox_fourth_title',
                'type' => 'text',
                'title' => __('Enter 4th Box Title', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
            array(
                'id' => 'homebox_fourth_text',
                'type' => 'text',
                'title' => __('Enter 4th Box Text', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'std' => ''
            ),
           array(
						    'id' => 'homepage_display',
						    'type' => 'radio',
						    'title' => __('Home Page display Settings', THEMENAME), 
						    'sub_desc' => __('Choose content type.', THEMENAME),
						    'desc' => __('', THEMENAME),
						    'options' => array('1' => 'Single page','2' => 'Category posts'),
						    'std' => '1'
						),
            array(
						    'id' => '23',
						    'type' => 'info',
						    'desc' => __('<p class="description">If Single page option is chosen, select a page that will be displayed.</p>', THEMENAME)
						),
            array(
                'id' => 'homepage_page',
                'type' => 'select',
                'title' => __('Select a page for the home page', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'options' => $options_pages
            ),
            array(
						    'id' => '24',
						    'type' => 'info',
						    'desc' => __('<p class="description">If Display category on the home page is chosen, select the category and the number of posts that will be displayed below the three boxes.</p>', THEMENAME)
						),
            array(
                'id' => 'homepage_category',
                'type' => 'multi_select',
                'title' => __('Select a category for the home page', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'desc' => __('', THEMENAME),
                'options' => $options_categories
            ),
            array(
                'id' => 'homepage_slogan',
                'type' => 'textarea',
                'title' => __('Home Page Slogan ', THEMENAME),
                'sub_desc' => __('', THEMENAME),
                'std' => ''
            )
        )
    );
    */    
    
    $sections[] = array(
        'icon' => NHP_OPTIONS_URL . 'img/glyphicons/glyphicons_019_cogwheel.png',
        'title' => __('Footer General Settings', THEMENAME),
        'desc' => __('<p class="description">Change copyright on footer ', 'elite'),
        'fields' => array(
        		array(
        				'id' => 'basic_footer_copyright',
        				'type' => 'textarea',
        				'title' => __('Footer copyright', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME)
        		),
        		array(
        				'id' => 'basic_footer_design',
        				'type' => 'text',
        				'title' => __('Thiết kê website bởi', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME),
        				'std' => ''
        		)
        )
    );
    $sections[] = array(
        'icon' => NHP_OPTIONS_URL . 'img/glyphicons/glyphicons_159_picture.png',
        'title' => __('Image Thumbnail Settings', THEMENAME),
        'desc' => __('<p class="description"></p>', 'elite'),
        'fields' => array(
            array(
						'id' => 'basic_timthumb_setting',
						'type' => 'radio',
						'title' => __('Display images with timthumb / Not timthumb', THEMENAME), 
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
						'options' => array('on' => 'Use timthumb','off' => 'Not timthumb'),
						'std' => 'off'
					),
        	array(
        				'id' => 'basic_crop_timthumb',
        				'type' => 'radio',
        				'title' => __('Crop or not crop size (timthumb)', THEMENAME),
        				'sub_desc' => __('', THEMENAME),
        				'desc' => __('', THEMENAME),
        				'options' => array('on' => 'Crop images','off' => 'Not crop images'),
        				'std' => 'off'
        		)
        )
    );
    
    
    $sections[] = array(
				'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_243_anchor.png',
				'title' => __('Contact Page Settings', THEMENAME),
				'desc' => __('', THEMENAME),
				'fields' => array(
				 array(
						'id' => 'contact-companyname',
						'type' => 'text',
						'title' => __('Company name', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME)
						),
						array(
								'id' => 'contact-adress',
								'type' => 'text',
								'title' => __('Address', THEMENAME),
								'sub_desc' => __('', THEMENAME),
								'desc' => __('', THEMENAME),
								'std' => ''
						),
         array(
						'id' => 'contact-phone',
						'type' => 'text',
						'title' => __('List telephone number (Ex: phonenumber1,phonenumber2)', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME)
						),
          array(
            'id' => 'contact-yahoo',
            'type' => 'text', 
						'title' => __('List yahoo (EX: yahoo1,yahoo2)', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
            'std' => ''
            ),
			array(
					'id' => 'contact-skype',
					'type' => 'text',
					'title' => __('List skype (Ex: skype1,skype2)', THEMENAME),
					'sub_desc' => __('', THEMENAME),
					'desc' => __('', THEMENAME),
					'std' => ''
			),
          array(
            'id' => 'contact-fax',
            'type' => 'text', 
						'title' => __('Fax', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
            'std' => ''
            ),
			array(
					'id' => 'contact-hotline',
					'type' => 'text',
					'title' => __('List hotline (Ex: hotline1,hotline2)', THEMENAME),
					'sub_desc' => __('', THEMENAME),
					'desc' => __('', THEMENAME),
					'std' => ''
			),
           
          array(
            'id' => 'contact-city',
            'type' => 'text', 
						'title' => __('City', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
            'std' => ''
            ),
          array(
            'id' => 'contact-zip',
            'type' => 'text', 
						'title' => __('ZIP code', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
            'std' => ''
            ),
          array(
            'id' => 'contact-state',
            'type' => 'text', 
						'title' => __('State', THEMENAME),
						'sub_desc' => __('', THEMENAME),
						'desc' => __('', THEMENAME),
            'std' => ''
            ),
          array(
            'id' => 'contact_form_email',
            'type' => 'text', 
						'title' => __('Contact form email', THEMENAME),
						'sub_desc' => __('Enter an email address to send the contact form to.', THEMENAME),
						'desc' => __('', THEMENAME),
            'std' => ''
            ),
			array(
					'id' => 'contact_form_email_title',
					'type' => 'text',
					'title' => __('Contact form email title', THEMENAME),
					'sub_desc' => __('Enter an subject email when send email contact.', THEMENAME),
					'desc' => __('', THEMENAME),
					'std' => ''
			),
          array(
						'id' => 'g-map-embed',
						'type' => 'text',
						'title' => __('Enter Google Maps embed', THEMENAME), 
						'sub_desc' => __('', THEMENAME),
						'desc' => __('Enter Google Maps Embed <a href="https://www.google.com/maps/@37.0625,-95.677068,4z"> Set google map tại đây </a>', THEMENAME),
						'std' => ''
						)
       		)
				);        
       
				
	$tabs = array();
			
	if (function_exists('wp_get_theme')){
		$theme_data = wp_get_theme();
		$theme_uri = $theme_data->get('ThemeURI');
		$description = $theme_data->get('Description');
		$author = $theme_data->get('Author');
		$version = $theme_data->get('Version');
		$tags = $theme_data->get('Tags');
	}else{
		$theme_data = get_theme_data(trailingslashit(get_stylesheet_directory()).'style.css');
		$theme_uri = $theme_data['URI'];
		$description = $theme_data['Description'];
		$author = $theme_data['Author'];
		$version = $theme_data['Version'];
		$tags = $theme_data['Tags'];
	}	

	global $NHP_Options;
	$NHP_Options = new NHP_Options($sections, $args, $tabs);
	
		// tesst
		//print_r($NHP_Options);
	
}//function
add_action('init', 'setup_framework_options', 0);

/*
 * 
 * Custom function for the callback referenced above
 *
 */
function my_custom_field($field, $value){
	print_r($field);
	print_r($value);

}//function

/*
 * 
 * Custom function for the callback validation referenced above
 *
 */
function validate_callback_function($field, $value, $existing_value){
	
	$error = false;
	$value =  'just testing';
	/*
	do your validation
	
	if(something){
		$value = $value;
	}elseif(somthing else){
		$error = true;
		$value = $existing_value;
		$field['msg'] = 'your custom error message';
	}
	*/
	
	$return['value'] = $value;
	if($error == true){
		$return['error'] = $field;
	}
	return $return;
	
}//function
?>